package FrameWork;
//Commit test
import Main.*;
import PostProcessing.OxygenPostProcessing;

import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import World.*;

public class Camera 
{
	boolean canMove = true;
	int pixelX = 0, pixelY = 0, xSize, ySize;
	
	public Camera(int xSize, int ySize)
	{
		this.xSize = xSize;
		this.ySize = ySize;
	}
	public void draw(SpaceGame game,Graphics g)
	{
		
		g.translate(-pixelX, -pixelY);
		game.backGround.draw(g);
		game.world.draw(g);
		game.constructionManager.draw(g);
		game.itemManager.draw(g);
		game.aiManager.draw(g);
		game.powerManager.draw(g);
		game.projectileManager.draw(g);
		game.oxygenEffects.draw(g);
		game.cursor.draw(g);
		game.miscManager.draw(g);
		g.dispose();
		
	}
	public void cameraUp()
	{
		if (pixelY >= 10)
			pixelY-=10;
	}
	public void cameraDown()
	{
		if (pixelY <= World.worldYSize*10-660)
			pixelY+=10;
	}
	public void cameraLeft()
	{
		if (pixelX >= 10)
			pixelX-=10;
	}
	public void cameraRight()
	{
		if (pixelX <= World.worldXSize*10-1010)
			pixelX+=10;
	}
	public int getPixelX()
	{
		return pixelX;
	}
	public int getPixelY()
	{
		return pixelY;
	}
	public boolean canMove()
	{
		return canMove;
	}
	public void setCanMove(boolean canMove)
	{
		this.canMove = canMove;
	}
}
